package com.pzh.guli.service.edu.controller.admin;


import com.pzh.guli.service.base.result.Result;
import com.pzh.guli.service.edu.pojo.CourseDescription;
import com.pzh.guli.service.edu.service.ICourseDescriptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 课程简介 前端控制器
 * </p>
 *
 * @author xzh
 * @since 2022-05-11
 */
@RestController
@RequestMapping("admin/edu/course-description")
public class CourseDescriptionController {
       @Autowired
       private ICourseDescriptionService courseDescriptionService;
       @GetMapping("get-info/{courseId}")
       public Result getCourseDescriptionByCId(@PathVariable String courseId){
           CourseDescription courseDescription=courseDescriptionService.getCourseDescriptionByCourseId(courseId);
           return Result.ok().data("item",courseDescription.getDescription());
       }
}

